What you need to know about modems...
| When I wrote the original What you need to know about modems... in January 1997, I didn't think about new achievements in communications technology. Fortunately, most people today have enough knowledge about modems, and it is not necessary to talk about the self-evident aspects of them. However, when I decided to revise this essay in November 1997 I thought about including all the aspects of a modem to create a complete reference. Following, is my third revision of this essay including, but not limited to MNP modems, Hayes command set and modem registers. It would be so pleased if you could drop me a line or two and tell me what you need to know about modems for my next revision. | ||
This article is marketed "AS IS". The author hereby disclaims all warranties relating to this article, expressed or implied, including but not limited to damage to hardware, software and/or data from use of this article. This is an updated version of my article, which was written on Jan. 26, 1997. Permission is granted to distribute unmodified copies of this article. This article is being marketing as freeware.
Best viewed at Internet Explorer, 800X600 Full Screen Mode
![]()
Introduction |
Not so long ago, almost all modems were 1200 bps units and they were all compatible with Hayes smartmodems. You could be connected to any BBS or even your friends modem-easy!. But today, if you choose the wrong one, you wont connect to a specific BBS or even to new developed remote systems.
Times have changed and now we are faced with too many buzzwords: V.32, V.32bis, MNP, etc. What do they mean? Is it really that important whether you buy a modem which doesnt support V.42?
All in all, Im going to focus on these topics. Through this article, Ill talk about the technical issues of the modem and provide you with some information on how you can have fully control of your modem. I hope to be helpful to both amateurs and professionals. By reading this text, you should be fully aware of all the aspects of a modem from hardware and software to transmission media.
| What's a modem? |
A modem is a device which can convert the computer's digital information to and from sound signals sent across the phone lines. The term 'modem' comes from a contraction of Modulate & Demodulate. Generally speaking, the computer is based on two digits: 0 & 1. The modem converts the binary 1s and 0s, sent by the computer, into different frequencies of sound. These tones can be sent over the standard telephone lines. Another modem, on the receiving end, takes these sounds and transforms them back into binary code.
In brief, a device, which accepts a serial stream of bits as input and produces a modulated carrier as output (or vice versa) is called a MODEM. The modem is placed somewhere between the (digital) computer and the (analog) telephone system. Most of the modems use a combination of modulation techniques to transmit multiple bits per baud.
| Modem Hardware |
Now its time to turn our attention to the technical issues of a modem. Broadly speaking, a modem consists of a housing, a circuit, and a small speaker called audio monitor.
Modem types
There are two types of modem, internals & externals. An internal modem is connected through an expansion slot on the mainboard. Phone lines can be connected to the modem through expansion apertures at the back of the system. The external modem is a separate device using the RS-232 cable to connect to the computer's serial port. Phone lines should be connected to the external unit.
The modem housing is commonly made of plastic or steel. It contains a modem circuit, a power supply, and a small speaker. It allows the user to monitor the progress of a call. At the front of the modem housing, the indicator lights may be seen (this depends on the type of the modem used). Connectors at the back link the modem to phone lines, computer and power cable.
Display panel
The display panel is an array of small Light-Emitting Diodes (LED) placed along the front of the modem housing. These lights show the activity and the state of a modem. Each activity is accompanied with abbreviated labels. The labels are:
| Label | State |
Remarks |
| AA | Auto Answer |
Modem is ready to answer |
| RD | Receive Data |
Modem is about to receiving data |
| OH | Off Hook |
Modem is connecting to another modem |
| TR | Terminal Ready |
Modem is ready to transfer data |
| CS | Clear to Send |
Modem is ready to receive data from computer and send them |
| RI | Ring Indicator |
Modem is Recognizes the telephone rings |
| MR | Modem Ready |
Modem is ready |
| CD | Carrier Detect |
Modem is able to recognize signals which are sent by the another modem |
Table A
Since an internal modem is inside the case and cant be seen, some software developers displays those labels on the screen at the time of connection. In this way, showing the activity of internal modems is possible on CRT and it increases the compatibility with the user. WinCim or Compuserve Information Manager is one of the communication software that provides such facility for users. It displays two of the important above-mentioned labels on the screen: carrier detect and receive data.
Audio monitor
A speaker that is included as part of a modem is called an audio monitor. It allows you to listen to whatever sound is on the phone line. Since the CD LED leads you to recognize the signals that are sent by the other modem, the audio speaker is often used to let you hear busy signals or make sure that the other modem picks up the carrier too.
| Modulation Techniques |
As we said at the beginning of this article, most of the modems use a combination of modulation techniques to transmit multiple bits per baud. In other words, all the existing modems use a combination of these techniques in order to transmit data through the lines. Following, we will discuss three modulation techniques which most modems use a combination of: modulation protocol, error control protocol and the data compression protocol.
Modulation protocols
In fact, high-speed modems are modems that feature modulation protocols at 9600bps or higher. V.22 is the another standard which supports information transmission at 1200bps and it is used usually outside the US. For more information on CCITT V modulation protocols, refer to Table B.
Error control protocols
Data compression protocols
The last modulation technique is called data compression protocol. Like error control protocols, there are two standards for these protocol one of which is called MNP5. Keep in mind that a modem can not support data compression without an error control protocol. A MNP5 modem requires MNP4 error control protocol.
The second data compression protocol is V.42bis, which is established by CCITT. V.42bis modem requires V.42 error control protocol. The maximum compression ratio that a MNP5 modem can achieve is 2:1. So a 14,400bps MNP5 modem can transfer data up to 28,800bps.
For V.42bis modems, the maximum compression ratio is 4:1. Thats why all those V.32 modem manufacturers claim that their modems provide throughput up to 38,400bps. Keep in mind that they are not very useful when you are downloading files from online services. The reason lies behind the fact that such modems emulate actual 38,400bps modems. By the way, you should only expect to see an actual throughput between 950 to 1100 cps, even if the modem supports V.32/V.42bis throughput up to 38,400bps.
| Transmission Media |
The purpose of buying a modem is to have the ability of transporting a raw bit stream of data from one computer or terminal to the another. Various physical media can be used for actual transmissions. Choosing the best physical media depends on too many parameters including but not limited to bandwidth, delay, cost and ease of installation and maintenance. Following, well discuss about two most commonly-used physical media in detail, and will have a quick look to the other media in general. From then on, well focus on some problems caused by unwanted energies called noise. Through this section well turn our attention to some cables used in communication industry such as RS-232-C and its technical issues.
Lines
Phone lines

Figure A
Leased lines
The second media is called a leased line. A leased line is a specific telephone line that directly connects two computers. It is usually rented from the Telephone Company. A leased line doesnt have many of the electronic restrictions that a dialup line has, so data can be sent faster. For example, data can be sent over these lines with a speed ranged 9600bps to 64Kbps. Carrier companies often use "Coaxial cable" as physical media in such transmissions. A coaxial cable consists of too many parts, one of which is a thick core at the middle of the cable. It is made of copper, insulating material surrounds the mentioned core. The insulator is encased by a cylindrical conductor, often as a closely woven braided mesh. A protective plastic sheath covers the entire cable. Following is a cutaway view of a coaxial cable.

Figure B
Problem with line noise
If transmission media were perfect, the receiver would receive exactly the same signal that the transmitter sent. Unfortunately, media are not perfect, so the received signal is not the same as the transmitted signal. For digital data, this difference can lead to errors. Transmission lines suffer from 3 major problems one of which is line noise. Noise, is unwanted energy from sources other than the transmitter. Thermal noise is caused by the random motion of the electrons in a wire and is unavoidable. In general, the higher the bps rate of your modem, the more line noise will appear. However, error control protocols strive to eliminate line noise.
Error correction, error detection code
MNP modem
Class 1:
Class 2:
Class 3:

Figure C
Class 4:
Class 5:
Class 5 supports error-correction protocol, but also compression protocol. It means that if you are going to send a file to the other end, the Class 5 modems compresses it automatically and the data will be decompressed on the other end before sending it to the receiving computer. It is about 100% faster than those which dont support error-correction protocol. However, keep in mind that if the file is compressed using any compression program, the speed of the transferring data will be drop down than if you were using no data compression.
Modem Cables
The back of the external modem has two connectors for phone hookup. One connects to the telephone and the other connects directly into the wall phone jack. A separate cable connects the modem to a serial port on the computer. Keep in mind that most modems are wired as DCE nowadays and most computers are wired as DTE. If you are connecting a DTE serial port on your computer to a DCE serial port on another computer, use a standard cable. Otherwise, you should use a reverse cable, if you want to connect either DCE to DCE or DTE to DTE. In the standards, the terminal or computer is officially called a DTE (Data Terminal Equipment) and the modem is officially called a DCE (Data Circuit-Terminating Equipment).
The mechanical specification for the modem cable which is called RS-232-C is for a 25-pin connector 47.04� .13mm wide, with all the other dimensions equally well specified. The top row has pins numbered 1 to 13 (left to right); the bottom row has pins numbered 14 to 25 (also left to right).
Lets look to the figure below. It shows 9 pins that are nearly always implemented. The remaining ones are frequently omitted. When the terminal or computer is powered up, it asserts DTR (pin 20). When the modem is powered up, it asserts DSR (pin 6). When the modem detects a carrier on the telephone line, it asserts CD (pin 8). RTS (pin 4) indicates that the terminal wants to send data. CTS (pin 5) mean that the modem is prepared to accept data. Data is transmitted on the Terminal circuit (pin 2) and received on the Receive circuit (pin 3).

Figure D
Modem Software |
Communication softwares
Operating modes
Now it is time to turn our attention to the modes that every modem has working in them: command mode and online mode.
Command mode
Online mode
When a connection with a remote system is established, your modem switches to the online mode (which is called data mode too). In this mode, the modem interprets all the information it receives as data (except the escape sequence). Now, the question is "is it possible to switch between these modes? If so, how?"
After you establish a connection with a remote modem you can switch modes in two ways: If you send the escape sequence (+++) to the modem in data mode, you'll switch to the command mode. In this mode, you can get back to the online mode by sending the "ATO" command.
Measurement units
Modems are generally categorized with the speed they transmit data. The two units of measurement used are the "baud rates" and "bits per second" (BPS). Though they are used interchangeably, they are not same. Baud refers to the number of packets of data sent each second. If each packet contains a single bit, then the baud and the BPS will be the same. Newer modems may include several data bits in each packet. For example a 2400-baud modem transmitting 4 bits per packet transmits data at 9600 bits per second.
Communication Standards
CCITT is an int'l organization. It sets global standards for modem types, computer networks, and facsimiles. It comes from French and in English stands for 'International Telegraph & Telephone Consultative Committee'. There are too many types of these standards, one of which, namely "V Protocols series', is tabulated as follows:
Protocol |
Remarks |
CCITT V.21 |
A standard for sending data by 300bps baud rates. This is seldom used in US. |
CCITT V.22 |
A standard for sending information by 1200bps baud rates. This is seldom used in US too. |
CCITT V.22 bis |
A standard for sending information by 2400bps baud rates. As a matter of fact, this is created by repeating V.22 twice a time, which made the modem to send data in 2400 rates. |
CCITT V.23 |
A standard for sending information by 1200/75 bps. Its usually used in Europe. |
CCITT V.32 |
A standard for sending data in 4800bps or 9600bps baud rates. |
CCITT V.32 bis |
A standard for sending data in 14400bps baud rates. This is compatible with V.32 standard modems. (i.e. this type of modems can reduce the baud rates to 9600bps) |
CCITT V.42 |
This is a standard that is used for error correction. This cause data to be filtered & educe the correct data. |
CCITT V.42 bis |
A standard for increasing data rates. This compresses data and on the receiving end, they will decompress. |
Hayes
Hayes Microcomputer Products, Inc. is the producer of Hayes modems which is well-known by its users. They introduce a set of commands, which are fully compatible with ITUs tariffs. Hence, you may hear "this modem is Hayes compatible". This means that the mentioned modem is fully compatible with ITUs tariffs and can process standard AT commands.
Today, most of the modems are compatible with Hayes and understand the standard AT commands. Following is a table which provide you Hayes Command Set (BASIC ones only) and Register Formats:
Hayes Command Set |
Description |
+++ |
Standard escape sequence |
AT, |
Delay processing of next character |
AT; |
Return to command state after dialing |
AT! |
Time break recall |
AT@ |
Instructs the modem to listen for five seconds silence before continuing. The value help in S7 determines the number of seconds the modem waits for silence. |
AT |
Standard attention sequence |
ATA |
Force to answer in the originate mode |
ATC0 |
Transmitter off |
ATC1 |
Transmitter on |
ATD <digit/characters> |
Dial number (Digits/characters 0-9 A B C D # * are numbers and characters the modem can dial. The characters A B C D # * represent specific tone pairs and therefore can be used only when tone dialing is selected. |
ATDP <digit/characters> |
Pulse dial (Digits/characters are same as above) |
ATDT <digit/characters> |
Tone dial (Digits/characters are same as above) |
ATE0 |
Disable local character echo |
ATE1 |
Enable local character echo |
ATF0 |
Half Duplex (echoes characters) |
ATF1 |
Full Duplex (doesnt echo characters) |
ATH0 |
Force line on hook |
ATH1 |
Force line off hook |
ATH2 |
Force line special off hook |
ATI0 |
Request product code, formatted PPR, PP=Prod., R= Rev. |
ATI1 |
Request ROM checksum |
ATI2 |
Perform ROM checksum |
ATI4 |
Identifying product feature |
ATL1 |
Speaker volume low |
ATL2 |
Speaker volume medium |
ATL3 |
Speaker volume high |
ATM0 |
Speaker always off |
ATM1 |
Speaker on except while carrier present |
ATM2 |
Speaker always on |
ATM3 |
Speaker on except while dialing & carrier present |
ATO |
Force modem into online state |
ATP |
Sets modem to default pulse dial |
ATQ0 |
Modem returns result codes |
ATQ1 |
Modem doesnt return result codes |
ATR |
Sets modem to answer mode after dialing out |
ATSn |
Sn is S register number n |
ATT |
Sets modem to default tone dial |
ATV0 |
Send numeric codes |
ATV1 |
Send word result codes |
ATX0 |
Basic result code set "connect", no dial tone detect |
ATX1 |
Extended result code set "connect 1200", no dial tone detect |
ATX2 |
Wait for dial tone, extended result codes |
ATX3 |
Detect busy signal, extended result codes |
ATX4 |
Wait for dial tone, detect busy, extended result codes |
ATW |
Wait for dial tone |
ATZ |
Reset to power up condition |
Table C
All modems have certain settings. Those settings available will vary from modem to modem, as well as how you set them. Modems work by responding to commands. These commands are known as dial modifiers or AT commands, which stands for Attention.
There are two command sets, basic and extended. Basic commands are typically a character or two and are preceded by the AT characters, for example:
ATDT - Sets the dial to a tone
ATDP - Sets the dial to a pulse
ATM0 - Turns the speaker off
These commands can be also issued on one line. If so, the AT should be given only once, for example:
ATDTM0
The extended commands start with an ampersand. Again, the AT characters precede them. For example:
AT&K0 - Turns off data compression.
Extended commands can be issued in conjunction with basic commands on one line. Again, the AT should be issued only once, for example:
ATDTM0&K0
While most settings are available on all modems, some modems have a few settings that others do not. For example, some modems accept &K4 and &K5 and some modems don't. The available settings for your specific modem will be found in your modem manual. You should know that we can control the way our modem works through registers too. Modems like all of the central processing units have got some registers.
Unfortunately, not all modems support all of these registers and some of them have got registers other than those listed here. Also note that some of them are just read only. However these registers can be used by all of us, but those are useful for programmers; because they prefer to control any device directly.
AT Sr = ## - to set a register
AT Sr? - to read a register
Where r is the register number.
Register # |
Values |
Register Function |
0 |
0-255 |
Ring to answer on (0 means dont answer) |
1 |
0-255 |
Ring count (clear after 8 second) (read only) |
2 |
0-255 |
Escape char, normally "+", 128-255 disable escape |
3 |
0-127 |
End of line character |
4 |
0-127 |
Line feed character |
5 |
0-32, 127 |
Backspace character |
6 |
2-255 |
Pause before dialing in seconds |
7 |
1-255 |
Wait for carrier in seconds |
8 |
0-255 |
Pause for comma in dial string in seconds |
9 |
1-255 |
Carrier detect response time in 1/10 second |
10 |
1-255 |
Carrier loss delay in 1/10 second, 255 = ignore CD |
11 |
50-255 |
Touch tone dial speed, in milliseconds |
12 |
20-255 |
Escape guard time, in 1/50 second, 0 = no delay |
13 |
7/6/5/4/3/2/1/0 0 1 2 3 4 5 6 7 |
Power up asynchronous data format unused result code, 0 = basic; 1 = extended parity, 0 = disabled; 1 = enabled parity, 0 = odd; 1 = even data bits, 0 = 7 bits, 1 = 8 bits undefined buffer overflow flag, 0 = disabled; 1 = enabled 8th bit, 0 = space, 1 = mark (8 bit only) |
14
|
7/6/5/4/3/2/1/0 0 1 2 3 4 5 6 7 |
Option register status data format unused local echo, 0 = disabled; 1 = enabled result codes, 0 = enabled; 1 = disabled result codes, 0 = numeric; 1 = word command recognition, 0 = enable; 1 = disable dial method, 0 = touch tone; 1 = pulse unused 0 = answer; 1 = originate |
15 |
Flag register |
|
16
|
7/6/5/4/3/2/1/0 0 1 2 3 4 5 6 7 |
Test status Analog loop, 0 = inactive; 1 = active unused digital loop, 0 = inactive; 1 = active remote request digital loop, 0 = inactive; 1 = active remote digital loop, 0 = inactive; 1 = active self test RDL, 0 = inactive, 1 = active self test analog loop, 0 = inactive; 1 = active unused |
18 |
0-255 |
Remote test timer in seconds |
21
|
7/6/5/4/3/2/1/0 0 1 2 3 4 5 6 7 bit 43 00 01 10 11 |
Option status jack type, 0 = RJ11, RJ41, RJ45; 1 = RJ12, RJ13 unused CTS state, 0 = follows RTS, 1 = forced on DTR modem behavior (see below) DTR modem behavior (see below) DCD, 0 = forced on; 1 = follows carrier DSR, 0 = forced on; 1 = behaves normally long space disconnect, 0 = disabled; 1 = enabled DTR modem behavior ignore DTR assume command state when DTR drops assume command state & disable auto answer when DTR dropsreset when DTR drops |
22 |
7/6/5/4/3/2/1/0 0 1 2 3 4 5 6 7 bit 10 01 10 11 bit 32 00 01 10 11 bit 654 100 101 110 111 |
Option status speaker volume (see below) speaker volume (see below) speaker setting (see below) speaker setting (see below) X command in effect (see below) X command in effect (see below) X command in effect (see below) make/break ratio, 0 = 39/61; 1 = 33/67
low med high
speaker always off speaker on until carrier detected speaker always on speaker off during dialing, then on until CD
X1 command in effect X2 command in effect X3 command in effect X4 command in effect |
23 |
7/6/5/4/3/2/1/0 0 1 2 3 4 5 6 7 bit21 00 01 10 11 bit 54 00 01 10 11 bit 76 00 01 10 |
Option status remote digital loop request, 0 = denied; 1 = OK baud rate (see below) baud rate (see below) unused parity (see below) parity (see below) guard tone setting (see below) guard tone setting (see below)
0-300bps 600 bps 1200 bps 2400 bps
even parity parity bit always 0 odd parity parity bit always 1
no guard tones 550 Hz guard tone 1800 Hz guard tone |
25 |
0-255 |
DTR detect delay in seconds |
26 |
0-255 |
RTS to CTS delay in milliseconds |
27 |
7/6/5/4/3/2/1/0 0 1 2 3 4 5 6 7 bit 10 00 01 10 11 bit 45 00 01 10 |
Option status synch/async mode (see below) synch/async mode (see below) phone line, 0 = public; 1 = leased Unused clock type (see below) clock type (see below) protocol, 0 = CCITT V.22, 1 = BELL 212A unused
asynchronous mode async/sync mode sync auto-dial sync manual dial
internal clock used external clock used slaved clock used |
Table D
| Protocols |
When referring to file transfers, a protocol is a method of sending and receiving a program. There are many methods available, each with different advantages and disadvantages. In this section, we are going to discuss the different protocols and both their advantages and disadvantages.
Kermit
An almost error-free file transfer protocol usually used for text transfers. It was developed at Columbia University.
Xmodem
A file transfer protocol developed by Ward Christensen around 1977. He invented this protocol for the 8-bit computer CP/M of that era. It is fairly slow in comparison to today's standards, but was the first widespread FTP. It uses blocks of 128 bytes, and after each block is sent, it sends a 1-byte checksum to check for errors. The block will be resent, if an error is encountered. Most communication programs offer this protocol.
Xmodem/CRC
The same as Xmodem, but this protocol has a 16-bit CRC instead of the checksum, which makes it more reliable. CRC stands for "Cyclic Redundancy Check".
Xmodem/1K
This is similar to the Xmodem/CRC, except that it uses blocks of 1024 bytes, rather than 128. It needs to be stopped less often to check for errors, so it is faster than Xmodem. This is sometimes wrongly called Ymodem.
Ymodem
A file transfer protocol witch can transfer more than one file at a time. It transfers both a file and some information about the file (including its length & the name of the file). It's similar to the Xmodem/CRC, except Ymodem can transfer more than one file at a time. It may use CRC-16 or a 1 byte checksum where applicable. It uses both 1024 byte blocks and 128 byte blocks.
Ymodem/g
This is Ymodem changed to provide best results with error-correcting modems. If there were any errors in the transmission, the transmission would be aborted.
Zmodem
A file transfer protocol, which is known for its speed, as well as the ability to transfer information about the files which it sends. It has crash recovery and auto download features and can use a 32-bit CRC, which makes it almost error-free.
Want to buy a modem? |
Choosing a modem is as easy as pie. All you have to do is make one choice, then follow the simple guidelines. As you saw in this article, there are two types of modems: Internal and External. How do you decide what type of modem to buy? First, forget about price. To make your choice, use the following guideline. If you understand a lot about modems and you are 100% sure that you will only use the modem in one computer, think about getting an internal one. It will take up less room and be more convenient. Otherwise, get an external one. Generally speaking, both have got some advantages and disadvantages: Its easy to move an external modem from one computer to another -even from a PC to MAC- and there are indicator lights on the front which are sometimes helpful if something goes wrong. Imagine your modem has hang up and you need to reset it. With an external modem, you can turn it off and on to perform the reset operation, but with an internal one, you will have to restart the entire computer.
Choosing between an internal and external modem is always the first step. But whats the second one? You should make sure that you get the right speed. Remember that not to buy a modem which is slower than 28.8Kbps! Also be warned that a slower modem will cost less, but this is just about the worst place to try to save money. If you are paying by the minute for Internet access, a slow modem will force you to pay a lot more for the extra time it takes to download large files. Therefore, if you make sure you get a 28.8Kbps modem, it will have all the correct standards built into it (V.34, V.42, and V.42bis).
A friendly note
You have finished the study of "What you need to know about modems", but this is only the beginning. Many interesting topics have not been treated in as much detail as they deserve and many others have not been included for the lack of time.
Remember that whatever it takes and wherever you are, you will have to be a beginner if you are going to learn about something. Otherwise, you won't learn something new, because you feel uncomfortable with being classified as a "beginner". Don't forget that if you don't become a beginner at something, you won't become an expert.
Now, you'll have to pick up one of many books published about PC communications, modems and networks, if you're going to learn more about such topics. At any rate, I would love to hear your comments, so don't hesitate to write them for me... Aloha!
References
| Technical reference for Hayes� modem users, 15 Sept. 1992 ver P2.0 | |
| Modem dictionary software, version 2.10 by R.Scott Perry | |
| Computer networks, written by Andrew S.Tanenbauem Ph.D. | |
| The Internet complete reference, written by Harley Hahn | |
| What you need to know about modems, ver 1.1 by Patrick Chen | |
| AT command online manual, � 1993 by Intel Corporation |
Acknowledgment
I would like to finish the third revision of this article by thanking Shabana Hussain, who accepted the edition of this article. My special word of thanks is due to her, who gave me her time and energy to edit this text. Finally, Id like to thank a good friend of mine, Shahram Modjahed, who encouraged me to complete this revision.
Disclaimer of warranty
This article is marketed "AS IS". The author hereby disclaims all warranties relating to this article, expressed or implied, including but not limited to damage to hardware, software and/or data from use of this article. This is an updated version of my article, which was written on Jan. 26, 1997. Permission is granted to distribute unmodified copies of this article. This article is being marketing as freeware.
Copyright notification
Hayes, Hayes microcomputer products, Hayes command set and Hayes registers are the registered trademarks of Hayes Corporation. All other above-mentioned products may be trademarks of their respective companies.
Join the author at: [email protected]
Written by Mehdi Mousavi
November 20, 1998